package com.cxl.springbootMybatisWeb.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cxl.springbootMybatisWeb.dao.CustomerDao;
import com.cxl.springbootMybatisWeb.model.Customer;
import com.cxl.springbootMybatisWeb.service.CustomerService;
import com.github.pagehelper.PageHelper;

/**
 * Function: TODO ADD FUNCTION. <br/>
 * Date: 2018年4月23日 上午12:18:12 <br/>
 *
 * @author XilinCheng
 * @version 1.0
 * @Copyright (c) 2018, CXL  All Rights Reserved.
 */
@Service
public class CustomerServiceImpl implements CustomerService {

	@Autowired
	private CustomerDao customerDao;
	
	@Override
	public List<Customer> findBySearch(int pageNum, int pageSize) {
		
		PageHelper.startPage(pageNum, pageSize);
		return customerDao.findBySearch();
	}

	@Override
	public int createCustomer(Customer customer) {
		
		return customerDao.createCustomer(customer);
	}

}

